
<!DOCTYPE html>
<html lang="en" >
<head>
  <meta charset="UTF-8">
  <title>CodePen - CSS Image Hover Effects</title>
  <style>
    @import url("https://fonts.googleapis.com/css?family=DM+Sans:400,500,700&display=swap");
    * {
    box-sizing: border-box;
    }

    body {
    margin: 0;
    width: 100%;
    height: 100vh;
    font-family: 'DM-sans', sans-serif;
    }

    .container {
    width: 100%;
    max-width: 1200px;
    border-radius: 4px;
    margin: 0 auto;
    padding: 40px 0;
    }

    .content {
    display: flex;
    flex-wrap: wrap;
    margin-top: 60px;
    padding: 0 30px;
    }

    .wrapper {
    width: 33.3%;
    height: 100%;
    padding: 10px;
    }

    .name {
    position: relative;
    font-size: 16px;
    display: inline-block;
    }
    .name:after {
    content: '';
    position: absolute;
    width: calc(100% + 10px);
    height: 1px;
    background-color: #000;
    bottom: -4px;
    left: 0;
    }

    .box {
    position: relative;
    max-height: 300px;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 1.4px 1.7px rgba(0, 0, 0, 0.017), 
    0 3.3px 4px rgba(0, 0, 0, 0.024), 
    0 6.3px 7.5px rgba(0, 0, 0, 0.03), 
    0 11.2px 13.4px rgba(0, 0, 0, 0.036), 
    0 20.9px 25.1px rgba(0, 0, 0, 0.043), 
    0 50px 60px rgba(0, 0, 0, 0.06);
    }
    .box .hide {
    opacity: 0;
    }
    .box .frame {
    position: absolute;
    border: 1px solid #fff;
    z-index: 2;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    }
    .box h2, .box p {
    position: absolute;
    color: #fff;
    z-index: 2;
    width: 100%;
    transition: opacity 0.2s, transform 0.3s;
    }
    .box h2 {
    font-weight: 500;
    font-size: 22px;
    margin-bottom: 0;
    letter-spacing: 1px;
    }
    .box p {
    bottom: 0;
    font-size: 14px;
    letter-spacing: 1px;
    }
    .box:hover {
    transition: all .3s ease-in-out;
    }
    .box:hover:before {
    transition: all .3s ease-in-out;
    }
    .box img {
    position: relative;
    width: 100%;
    height: 100%;
    z-index: 1;
    transition: all .3s ease-in-out;
    }
    .box img:hover {
    transition: all .3s ease-in-out;
    }
    .box img:after {
    content: '';
    position: absolute;
    background-color: rgba(0, 0, 0, 0.6);
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    }
    .box img:hover {
    transition: all .3s ease-in-out;
    }

    .vintage h2 {
    top: 50%;
    transform: translate3d(0, 60px, 0);
    text-align: center;
    }
    .vintage p {
    opacity: 0;
    bottom: 0;
    transform: translate3d(0, -10px, 0);
    font-size: 14px;
    letter-spacing: 1px;
    text-align: center;
    }
    .vintage:before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(72, 76, 97, 0) 0%, 
    rgba(72, 76, 97, 0.8) 75%);
    z-index: 2;
    bottom: -100%;
    left: 0;
    }
    .vintage:hover:before {
    bottom: 0;
    }
    .vintage:hover h2 {
    bottom: 40px;
    transform: translate3d(0, 20px, 0);
    }
    .vintage:hover p {
    opacity: 1;
    transform: translate3d(0, -30px, 0);
    }
    @media screen and (max-width: 880px) {
        .wrapper {
            width: 50%;
        }
    }
    @media screen and (max-width: 520px) {
        .wrapper {
            width: 100%;
        }
    }
    </style>
</head>
<body>

<div class="container">
  <div class="content">
     <div class="wrapper">
      <div class="box vintage">
        <img src="/images/1.jpg" alt="詹姆斯">
        <h2>詹姆斯</h2>
        <p>I'll be your Emmylou and I'll be your June</p>
      </div>
    </div> 
  </div>
</div>

  
</body>
</html>
